﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using RCREEE.Library.Entities;

namespace RCREEE.Library
{
    public class Search
    {
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
        public DataTable GetAllCountries(int LanguageCode)
        {
            return DataManager.Search_GetAllCountries(LanguageCode);
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
        public DataTable GetAllContactEntities(int LanguageCode)
        {
            return DataManager.Search_GetAllContactEntities(LanguageCode);
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
        public List<TinyItem> Search_GetProjectGroups(int LanguageCode)
        {
            return DataManager.Search_GetListItemsLookUps(9, LanguageCode);
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
        public List<TinyItem> Search_GetProjectTypes(int LanguageCode,int ProjectGroupId)
        {
            return DataManager.Search_GetListItemsLookUpsByParent(2,ProjectGroupId ,LanguageCode);
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
        public List<TinyItem> Search_GetAvailableProjects(int CountryId, int ProjectGroupId, int ProjectTypeId, int LanguageCode)
        {
            return DataManager.Search_GetAvailableProjects(CountryId, ProjectGroupId, ProjectTypeId, LanguageCode);
        }

        public DataTable SearchContacts(int CountryId, int EntityId, int LanguageCode)
        {
            return DataManager.SearchContacts(CountryId, EntityId, LanguageCode);
        }

        public DataTable SearchProjects(int CountryId, int ProjectGroupId, int ProjectTypeId, int LanguageCode)
        {
            return DataManager.SearchProjects(CountryId, ProjectGroupId, ProjectTypeId, LanguageCode);
        }

        public DataTable SearchItems_Cadres(int LanguageCode, int CountryId, string Keyword)
        {
            return DataManager.SearchItemsAndCadres(LanguageCode, CountryId, Keyword);
        }

        public string GetRecordLink(string Type, int RecordId)
        {
            return DataManager.GetRecordLink(Type, RecordId);
        }

    }
}
